<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>class类</title>
</head>
<script>
    class Phone{
        static name = 'iPhone14 Pro'
        //构造器名字不能修改
        constructor(brand,price){
            this.brand = brand
            this.price = price
        }
        call(){
            console.log('打电话啊')
        }
    }
    let onePlus = new Phone('+1',9999)
    console.log(onePlus)
    console.log(Phone.name)
</script>
</html>